
#定义
t1=()
t1=tuple()
t1=(1,2,"a","b")
t1=(1,2,3,"a","b",(1,2,3))

print("tuple 根据下标读取元素")
print(t1[0])
print(t1[5][2])

print("tuple 获取元素的下标")
print(t1)
print(t1.index(2))
print(t1.count(2))
print(len(t1))

print("tuple 循环")
for x in t1:
    print(x," ",end="")
print()